package com.happyclub.pojo;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Objects;

/**
 * @author 高欢
 * @description TODO
 * @date 2019/4/4
 */
public class TbTravelPhotoAlbumPK implements Serializable {
    private String travelId;
    private String photoAlbumId;

    @Column(name = "TRAVEL_ID")
    @Id
    public String getTravelId() {
        return travelId;
    }

    public void setTravelId(String travelId) {
        this.travelId = travelId;
    }

    @Column(name = "PHOTO_ALBUM_ID")
    @Id
    public String getPhotoAlbumId() {
        return photoAlbumId;
    }

    public void setPhotoAlbumId(String photoAlbumId) {
        this.photoAlbumId = photoAlbumId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbTravelPhotoAlbumPK that = (TbTravelPhotoAlbumPK) o;
        return Objects.equals(travelId, that.travelId) &&
                Objects.equals(photoAlbumId, that.photoAlbumId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(travelId, photoAlbumId);
    }
}
